#include "shmem.h"

int main(int argc, char const *argv[])
{
    char buf[1024];

    struct shmem_param param;
    shmem_init(&param, SHMEM_NAME, SHMEM_SIZE);

    while(1)
    {
        scanf("%s", buf);
        buf[strlen(buf)] = '\0';
        
        shmem_write(&param, buf, sizeof(buf));
    }

    return 0;
}